<!-- html -->
<template>
  <span class="span2">text1：</span>
  <!-- 单个参数 -->
  <input class="input1" type="text" :value="modelValue"
    @input="emit('update:modelValue', (<HTMLInputElement>$event.target).value)">
</template>

<!-- js或ts -->
<script lang="ts">
export default {
  name: 'vModelTest1Child1'
}
</script>

<!-- js或ts -->
<script setup lang="ts">
//数据
//接收参数
defineProps(['modelValue'])
//声明事件
let emit = defineEmits(['update:modelValue'])
</script>

<!-- 样式 -->
<style scoped></style>